<%@ page language="java"  pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>新闻管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<LINK href="resource/css/admin.css" type="text/css" rel="stylesheet">
	 <script type="text/javascript" src="<%=basePath%>scripts/ckeditor/ckeditor.js"></script>
	 <script type="text/javascript">
	    function  addcheck(){
	       var  code=document.getElementById("code").value;
            if(code=="1"){
               alert("请选择添加标题的类别");
               return false;
            }
            var  title=document.getElementById("title").value;
            if(title==""){
               alert("请填写新闻标题");
               return  false;
            }
            return true;
	    }
	 </script>
  </head>
  
  <body>
    <div align="center">
      <form  method="post" action="<%=basePath%>content/addnew.shtml" onsubmit="return addcheck()">
      <table>
      <tr>
      <td> 
          <input type="hidden" name="syscontent.id"   value="${syscontent.id}"/>
          新闻类别:</td><td> <select name="syscontent.code" id="code">
                 <option value="1" >请选择添加标题的类别</option>
                <option value="5" ${syscontent.code eq 5?'selected' :''}>集团新闻</option>
                <option value="6" ${syscontent.code eq 6?'selected' :''}>区域公司新闻</option>
                 <option value="7" ${syscontent.code eq 7?'selected' :''}>行业资讯</option>
            </select>
            </td>
       </tr>
        <tr><td>新闻标题：</td><td><input type="text" id="title" name="syscontent.title" value="${syscontent.title}"></td></tr>
        <tr><td> 内容：</td>
        <td><textarea id="content" name="syscontent.content" cols="28" rows="20">
          
           ${syscontent.content}
         </textarea></td></tr>
        <tr><td align="center" colspan="2"><input type="submit" value="保存" />&nbsp;&nbsp;<input type="reset" value="重置"></td></tr>
        </table>
        </form>
      </div>
        <script type="text/javascript">  
	//filebrowserUploadUrl ： 配置路径 Type 为不同类型文件在userfiles中存放的文件夹名
   					var editor = CKEDITOR.replace('content',{filebrowserUploadUrl : 'ckeditor/uploader?Type=File',   
									filebrowserImageUploadUrl : 'ckeditor/uploader?Type=Image',   
									filebrowserFlashUploadUrl : 'ckeditor/uploader?Type=Flash'  
   					});   
	</script>
  </body>
</html>
